package com.realphim.app.indie.entities;

import android.os.Parcel;
import android.os.Parcelable;

public class Video implements Parcelable {
	private String id;
	private String title;
	private String episodeId;
	private String episodeTitle;
	// private String url360;
	// private String url480;
	// private String url640;
	// private String urlMHD;
	// private String url720;
	// private String url1080;
	private String[] urls = new String[6];
	private String subVn;
	private String subEn;
	private String subOther;

	// Constructors
	public Video(String id, String title, String url360) {
		this.id = id;
		this.title = title;
		this.urls[0] = url360;
	}

	public Video(String id, String title, String url360, String subVn) {
		this.id = id;
		this.title = title;
		this.urls[0] = url360;
		this.subVn = subVn;
	}

	public Video(String id, String title, String episodeId,
			String episodeTitle, String url360, String subVn) {
		this.id = id;
		this.title = title;
		this.episodeId = episodeId;
		this.episodeTitle = episodeTitle;
		this.urls[0] = url360;
		this.subVn = subVn;
	}

	public Video(String id, String title, String url360, String url480,
			String url640, String urlMHD, String url720, String url1080,
			String subVn, String subEn, String subOther) {
		this.id = id;
		this.title = title;
		this.urls[0] = url360;
		this.urls[1] = url480;
		this.urls[2] = url640;
		this.urls[3] = urlMHD;
		this.urls[4] = url720;
		this.urls[5] = url1080;
		this.subVn = subVn;
		this.subEn = subEn;
		this.subOther = subOther;
	}

	public Video(String id, String title, String episodeId,
			String episodeTitle, String url360, String url480, String url640,
			String urlMHD, String url720, String url1080, String subVn,
			String subEn, String subOther) {
		this.id = id;
		this.title = title;
		this.episodeId = episodeId;
		this.episodeTitle = episodeTitle;
		this.urls[0] = url360;
		this.urls[1] = url480;
		this.urls[2] = url640;
		this.urls[3] = urlMHD;
		this.urls[4] = url720;
		this.urls[5] = url1080;
		this.subVn = subVn;
		this.subEn = subEn;
		this.subOther = subOther;
	}

	// END constructors

	// Getter and setter methods
	public String getId() {
		return id;
	}

	public void setId(String id) {
		this.id = id;
	}

	public String getTitle() {
		return title;
	}

	public void setTitle(String title) {
		this.title = title;
	}

	public String getEpisodeId() {
		return episodeId;
	}

	public void setEpisodeId(String episodeId) {
		this.episodeId = episodeId;
	}

	public String getEpisodeTitle() {
		return episodeTitle;
	}

	public void setEpisodeTitle(String episodeTitle) {
		this.episodeTitle = episodeTitle;
	}

	public String getSubVn() {
		return subVn;
	}

	public void setSubVn(String subVn) {
		this.subVn = subVn;
	}

	public String getSubEn() {
		return subEn;
	}

	public void setSubEn(String subEn) {
		this.subEn = subEn;
	}

	public String getSubOther() {
		return subOther;
	}

	public void setSubOther(String subOther) {
		this.subOther = subOther;
	}

	public String[] getUrls() {
		return urls;
	}

	public void setUrls(String[] urls) {
		this.urls = urls;
	}
	// END Getter and setter methods

	// Parcelling part
	public Video(Parcel in) {
		this.id = in.readString();
		this.title = in.readString();
		this.episodeId = in.readString();
		this.episodeTitle = in.readString();
		this.urls[0] = in.readString();
		this.urls[1] = in.readString();
		this.urls[2] = in.readString();
		this.urls[3] = in.readString();
		this.urls[4] = in.readString();
		this.urls[5] = in.readString();
		this.subVn = in.readString();
		this.subEn = in.readString();
		this.subOther = in.readString();
	}

	@Override
	public int describeContents() {
		return 0;
	}

	@Override
	public void writeToParcel(Parcel dest, int flags) {
		dest.writeString(this.id);
		dest.writeString(this.title);
		dest.writeString(this.episodeId);
		dest.writeString(this.episodeTitle);
		dest.writeString(this.urls[0]);
		dest.writeString(this.urls[1]);
		dest.writeString(this.urls[2]);
		dest.writeString(this.urls[3]);
		dest.writeString(this.urls[4]);
		dest.writeString(this.urls[5]);
		dest.writeString(this.subVn);
		dest.writeString(this.subEn);
		dest.writeString(this.subOther);
	}

	public static final Parcelable.Creator<Video> CREATOR = new Parcelable.Creator<Video>() {
		public Video createFromParcel(Parcel in) {
			return new Video(in);
		}

		public Video[] newArray(int size) {
			return new Video[size];
		}
	};
	// END Parcelling part

}
